The invention relates generally to the field of computer networking devices. More particularly, the invention relates to improved spanning tree support in an IEEE 802.1d compliant network device building block.
The Institute of Electrical and Electronics Engineers (IEEE) has developed a network communication standard 802.1d entitled, xe2x80x9cMedia Access Control (MAC) Bridges,xe2x80x9d approved May 31, 1990 (hereinafter xe2x80x9cIEEE 802.1dxe2x80x9d). In brief, IEEE 802.1d describes functions to be performed by compliant bridges including a Spanning Tree Protocol, building and maintenance of a filtering database, relaying and filtering of frames, and transmission of Bridge Protocol Data Units (BPDUs). A BPDU is a special message that bridges transmit to each other to facilitate determination of a spanning tree. The Spanning Tree Protocol""s primary function is to prevent loops in the bridged network. The Spanning Tree Protocol does this by enabling and disabling certain ports on a network device based upon negotiations with neighboring devices.
Several limitations of learning bridges in the prior art have been observed by the assignee of the present invention. For example, a port""s transition from the blocked state to the non-blocked state may cause attached subnets to be flooded with packets that are addressed to nodes belonging to those subnets. This flooding results in less than efficient operation of the learning bridge. Additionally, the conventional port-level approach to the Spanning Tree Protocol employed by prior art learning bridges is incompatible with the concept of trunking.
Generally, trunking can be thought of as a means of providing bandwidth aggregation between two points in a network (e.g., between two network devices). The multiple physical network links coupling two devices, for example, may be combined to form one logical channel, referred to as a xe2x80x9ctrunk,xe2x80x9d between the first device and the second device. As far as the Spanning Tree Protocol is concerned, a trunk is a loop. Thus, the conventional port-level approach will block at least N-1 ports of an N-port trunk to eliminate the perceived loop.
Based on the foregoing, it is desirable to provide a network device that provides more intelligent spanning tree processing. Specifically, it is desirable to perform the Spanning Tree Protocol at a trunk-level rather than at the port-level, such that all ports of a trunk are treated in a like manner with respect to the Spanning Tree Protocol. It is also desirable to provide one or more intermediate states to facilitate a port""s transition from the blocked state to the non-blocked state to reduce flooding. Further, it would be advantageous to provide improved methods of BPDU reception and transmission.
A method and apparatus for providing spanning tree support are described. According to one aspect of the present invention, a network device includes two or more ports that are part of a trunk. One of the two or more ports are selected for participation in a loop-free topology protocol. Then, the loop-free topology discovery protocol is executed for the selected port. If the loop-free topology discovery protocol indicates the selected port is to be blocked, then all of the ports of the trunk are blocked.
According to another aspect of the present invention, a set of states for association with each port of a network device is provided. The set of states includes a xe2x80x9cblockedxe2x80x9d state in which both learning and forwarding are inhibited, a xe2x80x9clearn onlyxe2x80x9d state in which learning is permitted and forwarding remains inhibited, and a xe2x80x9cnon-blockedxe2x80x9d state in which both learning and forwarding are permitted. Responsive to an indication from a loop-free topology discovery protocol that a port of the network device is to be unblocked, a state associated with the first port is set to the xe2x80x9clearn onlyxe2x80x9d state for a predetermined amount of time. Then, after the predetermined amount of time, the state associated with the first port is set to the xe2x80x9cnon-blockedxe2x80x9d state. This aspect of the present invention allows a port to begin learning prior to actively participating in normal forwarding/bridging of traffic. Advantageously, transitioning to the learn only state prior to transitioning to the not blocked state for a temporary period of time reduces flooding.
According to a further aspect of the present invention, a blocked port is configured to receive configuration messages by providing an input interface address register in each ports of a network device. The input address register for filtering addresses that do not match an address contained therein. A loop-free topology discovery protocol is executed for a port of the network. If the loop-free topology discovery protocol indicates the port is to be blocked, then a multicast address associated with configuration messages is written into the input interface address register of the port. In this manner, the first port will subsequently accept configuration messages while filtering all other packets.
According to another aspect of the present invention, configuration messages may be forwarded over blocked ports of a network device. A central processing unit (CPU) generates a configuration message and a corresponding set of control information. The control information includes a directed mode flag indicating whether or not packet header matching is to be avoided. The control information also including information regarding an output port to which the configuration message is to be transferred. The specified output port being a port that has previously been blocked by a loop-free topology discovery protocol. After generating the configuration message, the CPU transfers the configuration message and the corresponding set of control information to the network device for transmission. Based upon the directed mode flag, a CPU interface forwards the configuration message to the specified output port.